package test_gui01;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.text.*;
import java.util.Timer;

public class TimeFrame extends JFrame implements ActionListener
{
  JLabel label;
  SimpleDateFormat sdf = new SimpleDateFormat( "dd MMM yyyy hh:mm:ss" );
  public TimeFrame()
  {
    super( "Time Frame" );
    setSize( 500, 500 );
    label = new JLabel( sdf.format( new GregorianCalendar().getTime() ) );
    label.setHorizontalAlignment( JLabel.RIGHT );
    Container cont = getContentPane();
    cont.add( label, BorderLayout.SOUTH );
    //Timer timer = new Timer(500.tt);
    //timer.start();
  }
  public void actionPerformed( ActionEvent ae )
  {
    label.setText( sdf.format( new GregorianCalendar().getTime() ) );
  }
  public static void main(String[] args) 
  {
    TimeFrame tf = new TimeFrame();
    tf.setVisible( true );
  }
}